#pragma once

#include "cmsisDapIO.h"

class cmsisDapHid: public cmsisDapIO
{
public:
    cmsisDapHid();
    ~cmsisDapHid();

public:
    virtual int open(const char *devname);
    virtual void close();
    virtual int read(struct cmsis_dap *dap, int timeout_ms);
    virtual int write(struct cmsis_dap *dap, int len, int timeout_ms);
    virtual int packet_buffer_alloc(struct cmsis_dap *dap, unsigned int pkt_sz);

private:
    void *_dev;
};
